package com.fausto.learnimprint.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author fausto
 * @since 2022-03-28
 */
@TableName("announcement")
public class Announcement implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 公告唯一id
     */
    @TableId(value = "announcement_id", type = IdType.AUTO)
    private Integer announcementId;

    /**
     * 公告标题
     */
    private String announcementTitle;

    /**
     * 公告内容
     */
    private String announcementBody;

    /**
     * 是否置顶0 置顶 1未置顶
     */
    @TableField(fill = FieldFill.INSERT)
    private Integer announcementTop;

    /**
     * 发布时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime announcementTime;

    public Integer getAnnouncementId() {
        return announcementId;
    }

    public void setAnnouncementId(Integer announcementId) {
        this.announcementId = announcementId;
    }

    public String getAnnouncementTitle() {
        return announcementTitle;
    }

    public void setAnnouncementTitle(String announcementTitle) {
        this.announcementTitle = announcementTitle;
    }

    public String getAnnouncementBody() {
        return announcementBody;
    }

    public void setAnnouncementBody(String announcementBody) {
        this.announcementBody = announcementBody;
    }

    public Integer getAnnouncementTop() {
        return announcementTop;
    }

    public void setAnnouncementTop(Integer announcementTop) {
        this.announcementTop = announcementTop;
    }

    public LocalDateTime getAnnouncementTime() {
        return announcementTime;
    }

    public void setAnnouncementTime(LocalDateTime announcementTime) {
        this.announcementTime = announcementTime;
    }

    @Override
    public String toString() {
        return "Announcement{" +
                "announcementId=" + announcementId +
                ", announcementTitle=" + announcementTitle +
                ", announcementBody=" + announcementBody +
                ", announcementTop=" + announcementTop +
                ", announcementTime=" + announcementTime +
                "}";
    }
}
